package com.wngbms.netty._02http;

import io.netty.channel.ChannelHandlerContext;
import io.netty.channel.ChannelInboundHandlerAdapter;
import lombok.extern.slf4j.Slf4j;

@Slf4j
public class ServerExceptionHandler extends ChannelInboundHandlerAdapter {

    @Override
    public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) throws Exception {
        log.error("XXXXXXXXXXXXXXXXXXXXXXXXXXX{}", cause.getMessage(), cause);
//        log.error("XXXXXXXXXXXXXXXXXXXXXXXXXXX{}", cause.getMessage());
        ctx.channel().close();
    }
}
